Optimal. Leaf size=278 \[ \frac {b \left (14 a^2 C+18 a b B+5 b^2 C\right ) \tan (c+d x) \sec ^3(c+d x)}{24 d}+\frac {\left (5 a^3 C+15 a^2 b B+12 a b^2 C+4 b^3 B\right ) \tan ^3(c+d x)}{15 d}+\frac {\left (5 a^3 C+15 a^2 b B+12 a b^2 C+4 b^3 B\right ) \tan (c+d x)}{5 d}+\frac {\left (8 a^3 B+18 a^2 b C+18 a b^2 B+5 b^3 C\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (8 a^3 B+18 a^2 b C+18 a b^2 B+5 b^3 C\right ) \tan (c+d x) \sec (c+d x)}{16 d}+\frac {b^2 (4 a C+3 b B) \tan (c+d x) \sec ^4(c+d x)}{15 d}+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))^2}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.61, antiderivative size = 278, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4072, 4026, 4076, 4047, 3767, 4046, 3768, 3770} \[ \frac {\left (15 a^2 b B+5 a^3 C+12 a b^2 C+4 b^3 B\right ) \tan ^3(c+d x)}{15 d}+\frac {\left (15 a^2 b B+5 a^3 C+12 a b^2 C+4 b^3 B\right ) \tan (c+d x)}{5 d}+\frac {\left (18 a^2 b C+8 a^3 B+18 a b^2 B+5 b^3 C\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {b \left (14 a^2 C+18 a b B+5 b^2 C\right ) \tan (c+d x) \sec ^3(c+d x)}{24 d}+\frac {\left (18 a^2 b C+8 a^3 B+18 a b^2 B+5 b^3 C\right ) \tan (c+d x) \sec (c+d x)}{16 d}+\frac {b^2 (4 a C+3 b B) \tan (c+d x) \sec ^4(c+d x)}{15 d}+\frac {b C \tan (c+d x) \sec ^3(c+d x) (a+b \sec (c+d x))^2}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3767
Rule 3768
Rule 3770
Rule 4026
Rule 4046
Rule 4047
Rule 4072
Rule 4076
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \sec ^3(c+d x) (a+b \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx\\ &=\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x))^2 \tan (c+d x)}{6 d}+\frac {1}{6} \int \sec ^3(c+d x) (a+b \sec (c+d x)) \left (3 a (2 a B+b C)+\left (5 b^2 C+6 a (2 b B+a C)\right ) \sec (c+d x)+2 b (3 b B+4 a C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b^2 (3 b B+4 a C) \sec ^4(c+d x) \tan (c+d x)}{15 d}+\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x))^2 \tan (c+d x)}{6 d}+\frac {1}{30} \int \sec ^3(c+d x) \left (15 a^2 (2 a B+b C)+6 \left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \sec (c+d x)+5 b \left (18 a b B+14 a^2 C+5 b^2 C\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b^2 (3 b B+4 a C) \sec ^4(c+d x) \tan (c+d x)}{15 d}+\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x))^2 \tan (c+d x)}{6 d}+\frac {1}{30} \int \sec ^3(c+d x) \left (15 a^2 (2 a B+b C)+5 b \left (18 a b B+14 a^2 C+5 b^2 C\right ) \sec ^2(c+d x)\right ) \, dx+\frac {1}{5} \left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \int \sec ^4(c+d x) \, dx\\ &=\frac {b \left (18 a b B+14 a^2 C+5 b^2 C\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b^2 (3 b B+4 a C) \sec ^4(c+d x) \tan (c+d x)}{15 d}+\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x))^2 \tan (c+d x)}{6 d}+\frac {1}{8} \left (8 a^3 B+18 a b^2 B+18 a^2 b C+5 b^3 C\right ) \int \sec ^3(c+d x) \, dx-\frac {\left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 d}\\ &=\frac {\left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \tan (c+d x)}{5 d}+\frac {\left (8 a^3 B+18 a b^2 B+18 a^2 b C+5 b^3 C\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {b \left (18 a b B+14 a^2 C+5 b^2 C\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b^2 (3 b B+4 a C) \sec ^4(c+d x) \tan (c+d x)}{15 d}+\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x))^2 \tan (c+d x)}{6 d}+\frac {\left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \tan ^3(c+d x)}{15 d}+\frac {1}{16} \left (8 a^3 B+18 a b^2 B+18 a^2 b C+5 b^3 C\right ) \int \sec (c+d x) \, dx\\ &=\frac {\left (8 a^3 B+18 a b^2 B+18 a^2 b C+5 b^3 C\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \tan (c+d x)}{5 d}+\frac {\left (8 a^3 B+18 a b^2 B+18 a^2 b C+5 b^3 C\right ) \sec (c+d x) \tan (c+d x)}{16 d}+\frac {b \left (18 a b B+14 a^2 C+5 b^2 C\right ) \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {b^2 (3 b B+4 a C) \sec ^4(c+d x) \tan (c+d x)}{15 d}+\frac {b C \sec ^3(c+d x) (a+b \sec (c+d x))^2 \tan (c+d x)}{6 d}+\frac {\left (15 a^2 b B+4 b^3 B+5 a^3 C+12 a b^2 C\right ) \tan ^3(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 5.38, size = 214, normalized size = 0.77 \[ \frac {15 \left (8 a^3 B+18 a^2 b C+18 a b^2 B+5 b^3 C\right ) \tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \left (10 b \left (18 a^2 C+18 a b B+5 b^2 C\right ) \sec ^3(c+d x)+80 \left (a^3 C+3 a^2 b B+6 a b^2 C+2 b^3 B\right ) \tan ^2(c+d x)+15 \left (8 a^3 B+18 a^2 b C+18 a b^2 B+5 b^3 C\right ) \sec (c+d x)+240 \left (a^3 C+3 a^2 b B+3 a b^2 C+b^3 B\right )+48 b^2 (3 a C+b B) \tan ^4(c+d x)+40 b^3 C \sec ^5(c+d x)\right )}{240 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 286, normalized size = 1.03 \[ \frac {15 \, {\left (8 \, B a^{3} + 18 \, C a^{2} b + 18 \, B a b^{2} + 5 \, C b^{3}\right )} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (8 \, B a^{3} + 18 \, C a^{2} b + 18 \, B a b^{2} + 5 \, C b^{3}\right )} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (32 \, {\left (5 \, C a^{3} + 15 \, B a^{2} b + 12 \, C a b^{2} + 4 \, B b^{3}\right )} \cos \left (d x + c\right )^{5} + 15 \, {\left (8 \, B a^{3} + 18 \, C a^{2} b + 18 \, B a b^{2} + 5 \, C b^{3}\right )} \cos \left (d x + c\right )^{4} + 40 \, C b^{3} + 16 \, {\left (5 \, C a^{3} + 15 \, B a^{2} b + 12 \, C a b^{2} + 4 \, B b^{3}\right )} \cos \left (d x + c\right )^{3} + 10 \, {\left (18 \, C a^{2} b + 18 \, B a b^{2} + 5 \, C b^{3}\right )} \cos \left (d x + c\right )^{2} + 48 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.38, size = 932, normalized size = 3.35 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.70, size = 478, normalized size = 1.72 \[ \frac {a^{3} B \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {a^{3} B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {2 a^{3} C \tan \left (d x +c \right )}{3 d}+\frac {C \,a^{3} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{3 d}+\frac {2 a^{2} b B \tan \left (d x +c \right )}{d}+\frac {a^{2} b B \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{d}+\frac {3 C \,a^{2} b \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {9 C \,a^{2} b \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {9 C \,a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {3 B a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {9 B a \,b^{2} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {9 B a \,b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {8 C a \,b^{2} \tan \left (d x +c \right )}{5 d}+\frac {3 C a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{4}\left (d x +c \right )\right )}{5 d}+\frac {4 C a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{5 d}+\frac {8 b^{3} B \tan \left (d x +c \right )}{15 d}+\frac {b^{3} B \tan \left (d x +c \right ) \left (\sec ^{4}\left (d x +c \right )\right )}{5 d}+\frac {4 b^{3} B \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{15 d}+\frac {b^{3} C \tan \left (d x +c \right ) \left (\sec ^{5}\left (d x +c \right )\right )}{6 d}+\frac {5 b^{3} C \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{24 d}+\frac {5 b^{3} C \sec \left (d x +c \right ) \tan \left (d x +c \right )}{16 d}+\frac {5 b^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 409, normalized size = 1.47 \[ \frac {160 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{3} + 480 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{2} b + 96 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C a b^{2} + 32 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} B b^{3} - 5 \, C b^{3} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 90 \, C a^{2} b {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 90 \, B a b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 120 \, B a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.54, size = 571, normalized size = 2.05 \[ \frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {B\,a^3}{2}+\frac {9\,C\,a^2\,b}{8}+\frac {9\,B\,a\,b^2}{8}+\frac {5\,C\,b^3}{16}\right )}{2\,B\,a^3+\frac {9\,C\,a^2\,b}{2}+\frac {9\,B\,a\,b^2}{2}+\frac {5\,C\,b^3}{4}}\right )\,\left (B\,a^3+\frac {9\,C\,a^2\,b}{4}+\frac {9\,B\,a\,b^2}{4}+\frac {5\,C\,b^3}{8}\right )}{d}+\frac {\left (B\,a^3-2\,B\,b^3-2\,C\,a^3+\frac {11\,C\,b^3}{8}+\frac {15\,B\,a\,b^2}{4}-6\,B\,a^2\,b-6\,C\,a\,b^2+\frac {15\,C\,a^2\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (\frac {14\,B\,b^3}{3}-3\,B\,a^3+\frac {22\,C\,a^3}{3}+\frac {5\,C\,b^3}{24}-\frac {21\,B\,a\,b^2}{4}+22\,B\,a^2\,b+14\,C\,a\,b^2-\frac {21\,C\,a^2\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (2\,B\,a^3-\frac {52\,B\,b^3}{5}-12\,C\,a^3+\frac {15\,C\,b^3}{4}+\frac {3\,B\,a\,b^2}{2}-36\,B\,a^2\,b-\frac {156\,C\,a\,b^2}{5}+\frac {3\,C\,a^2\,b}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (2\,B\,a^3+\frac {52\,B\,b^3}{5}+12\,C\,a^3+\frac {15\,C\,b^3}{4}+\frac {3\,B\,a\,b^2}{2}+36\,B\,a^2\,b+\frac {156\,C\,a\,b^2}{5}+\frac {3\,C\,a^2\,b}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {5\,C\,b^3}{24}-\frac {14\,B\,b^3}{3}-\frac {22\,C\,a^3}{3}-3\,B\,a^3-\frac {21\,B\,a\,b^2}{4}-22\,B\,a^2\,b-14\,C\,a\,b^2-\frac {21\,C\,a^2\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (B\,a^3+2\,B\,b^3+2\,C\,a^3+\frac {11\,C\,b^3}{8}+\frac {15\,B\,a\,b^2}{4}+6\,B\,a^2\,b+6\,C\,a\,b^2+\frac {15\,C\,a^2\,b}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (B + C \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________